﻿<%@ Page Title="ControlePermissao" Language="C#" MasterPageFile="~/Cash.Master"
    AutoEventWireup="true" CodeBehind="ControlePermissao.aspx.cs" Inherits="Cash.View.Administracao.ControlePermissao" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellpadding="4" cellspacing="0" class="table" style="border-collapse: collapse;"
        align="center">
        <tr>
            <td align="center" colspan="4" class="titletable">
                Controle de Permissão
            </td>
        </tr>
        <!-- Titulo -->
        <tr>
            <td style="width: 21%" align="right">
                <asp:Label ID="lblNomePerfil" runat="server" Text="Perfil:"></asp:Label>
            </td>
            <td align="left" style="width: 450px" colspan="2">
                <asp:DropDownList ID="ddlNomePerfil" runat="server" Width="254px" AutoPostBack="True"
                    OnSelectedIndexChanged="ddlPerfil_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="ddlNomePerfil"
                    InitialValue="0" ValidationGroup="validacao" class="validacaoCampos">* Campo obrigatório.</asp:RequiredFieldValidator>
            </td>
            <td align="left" style="width: 270px">
            </td>
        </tr>
        <!-- Perfil -->
        <tr>
            <td style="width: 21%" align="right">
                <asp:Label ID="lblNomePagina" runat="server" Text="Página:"></asp:Label>
            </td>
            <td align="left" style="width: 450px" colspan="2">
                <asp:DropDownList ID="ddlNomePagina" runat="server" Width="254px">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="ddlNomePagina"
                    InitialValue="0" ValidationGroup="validacao" class="validacaoCampos">* Campo obrigatório.</asp:RequiredFieldValidator>
            </td>
            <td align="left" style="width: 270px">
            </td>
        </tr>
        <!-- Pagina -->
        <tr>
            <td align="center" colspan="4">
                <asp:Button ID="btnAdicionar" runat="server" CssClass="button" Text="Adicionar" OnClick="btnAdicionar_Click"
                    ValidationGroup="validacao" />
            </td>
        </tr>
        <tr>
            <td align="center" colspan="4">
                <asp:Label ID="lblErro" CssClass="lblErro" runat="server" Text="" Visible="false"
                    class="validacaoCampos"></asp:Label>
                <asp:GridView ID="grvPesquisa" runat="server" Class="gridView" CellPadding="3" GridLines="Vertical"
                    AutoGenerateColumns="False" AllowPaging="True" OnPageIndexChanging="grvPesquisa_PageIndexChanging"
                    OnRowDeleting="grvPesquisa_RowDeleting">
                    <AlternatingRowStyle BackColor="#DCDCDC" />
                    <Columns>
                        <asp:CommandField ButtonType="Image" DeleteText="Deletar" ShowDeleteButton="True"
                            DeleteImageUrl="~/images/remove.png" ShowEditButton="false" AccessibleHeaderText="Excluir"
                            InsertVisible="False" ShowCancelButton="False">
                            <ControlStyle Height="22px" Width="22px" />
                            <ItemStyle CssClass="botaoAcao" />
                        </asp:CommandField>
                        <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
                        <asp:BoundField DataField="Perfil" HeaderText="Perfil" SortExpression="Perfil" />
                        <asp:BoundField DataField="Pagina" HeaderText="Página" SortExpression="Pagina" />
                        <asp:BoundField DataField="Data" HeaderText="Data de Cadastro" DataFormatString="{0:g}"
                            SortExpression="Data" />
                        <asp:BoundField DataField="Menu" HeaderText="Menu" SortExpression="Menu" />
                    </Columns>
                    <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                    <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                    <SortedAscendingHeaderStyle BackColor="#0000A9" />
                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                    <SortedDescendingHeaderStyle BackColor="#000065" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
